package com.lwphk.easydocs.core.vo;

import java.util.Arrays;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;

public class MethodInfo {

	private static final Set<String> DEFAULT_REQUEST_METHODS = new HashSet<String>(Arrays.asList("GET","HEAD", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "TRACE"));
	
	
	
	
	/**
	 * 标签备注  用于展示
	 */
	private String tags;
	
	/**
	 * 接口描述
	 */
	private String remark;
	
	/**
	 * JAVA类方法名
	 */
	private String methodName;
	
	/**
	 * 访问地址
	 */
	private Set<String> patterns;
	
	/**
	 * 返回值类型
	 */
	private Class<?> returnType;
	
	
	/**
	 * 请求方法  GET POST  PUT....
	 */
	private Set<String> requestMethods = DEFAULT_REQUEST_METHODS;
	
	/**
	 * 参数  query参数
	 */
	private List<ParamInfo> queryParams = new LinkedList<ParamInfo>();
	
	/**
	 * 参数  path参数
	 */
	private List<ParamInfo> pathParams = new LinkedList<ParamInfo>();
	
	
	/**
	 * 参数  body参数
	 */
	private List<ParamInfo> bodyParams = new LinkedList<ParamInfo>();
	
	/**
	 * body 参数
	 */
	private String bodyVal;
	
	/**
	 * 请求头类型
	 */
	private String contentType = ContentType.FROM_URLENCODED;
	
	
	/**
	 * 所属目录
	 */
	private String parentDir;
	
	
	public String getParentDir() {
		return parentDir;
	}


	public void setParentDir(String parentDir) {
		this.parentDir = parentDir;
	}


	public String getTags() {
		return tags;
	}


	public void setTags(String tags) {
		this.tags = tags;
	}


	public String getContentType() {
		return contentType;
	}


	public void setContentType(String contentType) {
		this.contentType = contentType;
	}




	public String getRemark() {
		return remark;
	}


	public void setRemark(String remark) {
		this.remark = remark;
	}


	public String getMethodName() {
		return methodName;
	}


	public void setMethodName(String methodName) {
		this.methodName = methodName;
	}


	public Set<String> getPatterns() {
		return patterns;
	}


	public void setPatterns(Set<String> patterns) {
		this.patterns = patterns;
	}


	public Class<?> getReturnType() {
		return returnType;
	}


	public void setReturnType(Class<?> returnType) {
		this.returnType = returnType;
	}


	public Set<String> getRequestMethods() {
		return requestMethods;
	}


	public void setRequestMethods(Set<String> requestMethods) {
		this.requestMethods = requestMethods;
	}


	public List<ParamInfo> getQueryParams() {
		return queryParams;
	}


	public void setQueryParams(List<ParamInfo> queryParams) {
		this.queryParams = queryParams;
	}



	public List<ParamInfo> getBodyParams() {
		return bodyParams;
	}


	public void setBodyParams(List<ParamInfo> bodyParams) {
		this.bodyParams = bodyParams;
	}


	public String getBodyVal() {
		return bodyVal;
	}


	public void setBodyVal(String bodyVal) {
		this.bodyVal = bodyVal;
	}


	public List<ParamInfo> getPathParams() {
		return pathParams;
	}


	public void setPathParams(List<ParamInfo> pathParams) {
		this.pathParams = pathParams;
	}

	
	
}
